package com.house.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.house.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User>{

    @Select("select id, user_name, nick_name, phone, status, password, area_id, role_id, create_time, update_time, create_user, update_user from user where user_name = #{userName}")
    User selectByUserName(String userName);
    @Delete("delete from user where id = #{id}")
    int delete(Long id);
}
